package srjava.messages;

import java.io.IOException;
import java.io.StringReader;

public class CordinatorAddresRet extends Message {
	CordinatorInfo cordinatorInfo;
	
	public CordinatorAddresRet() {
		this.cordinatorInfo = new CordinatorInfo();
		this.msgType = MessageType.CORDINATOR_ADDRES_RET;
	}

	public CordinatorAddresRet(CordinatorInfo cordinatorInfo) {
		this.msgType = MessageType.CORDINATOR_ADDRES_RET;
		this.cordinatorInfo = cordinatorInfo;
	}

	@Override
	public String serialize() {
		String pom = super.serialize() + cordinatorInfo.serialize();
		return pom;
	}

	@Override
	public void deSerialize(StringReader s) throws IOException {
		//super.deSerialize(s);
		cordinatorInfo.deSerialize(s);
	}

	public CordinatorInfo getCordinatorInfo() {
		return cordinatorInfo;
	}

	public void setCordinatorInfo(CordinatorInfo cordinatorInfo) {
		this.cordinatorInfo = cordinatorInfo;
	}
	
	
}
